Imports System.Drawing.Printing
Imports DevExpress.XtraReports.UI
Imports DevExpress.XtraReports.Parameters
Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls

Public Class rptResumenPorTicket
    Private currentSortCell As XRTableCell

    Private Sub rptResumenPorTicket_ParametersRequestBeforeShow(ByVal sender As System.Object, ByVal e As DevExpress.XtraReports.Parameters.ParametersRequestEventArgs) Handles MyBase.ParametersRequestBeforeShow
        Dim DataSet As New dbFireAndIceDataSet
        Dim EmpresasTA As New dbFireAndIceDataSetTableAdapters.empresasTableAdapter
        Dim NominasTA As New dbFireAndIceDataSetTableAdapters.nominastipoTableAdapter
        EmpresasTA.Fill(DataSet.empresas)
        NominasTA.Fill(DataSet.nominastipo)

        Dim Info As ParameterInfo
        For Each Info In e.ParametersInformation
            If Info.Parameter.Name = "empresa" Then
                Dim LookUpEdit As New LookUpEdit()
                LookUpEdit.Properties.DataSource = DataSet.empresas
                LookUpEdit.Properties.DisplayMember = "descripcion"
                LookUpEdit.Properties.ValueMember = "idempresa"
                LookUpEdit.Properties.Columns.Add(New  _
                LookUpColumnInfo("descripcion", 0, "Empresa"))
                Info.Editor = LookUpEdit
            End If
            If Info.Parameter.Name = "nomina1" Then
                Dim LookUpEdit As New LookUpEdit()
                LookUpEdit.Properties.DataSource = DataSet.nominastipo
                LookUpEdit.Properties.DisplayMember = "descripcion"
                LookUpEdit.Properties.ValueMember = "idnomina"
                LookUpEdit.Properties.Columns.Add(New  _
                LookUpColumnInfo("descripcion", 0, "Tipo de nomina"))
                Info.Editor = LookUpEdit
            End If
            If Info.Parameter.Name = "nomina2" Then
                Dim LookUpEdit As New LookUpEdit()
                LookUpEdit.Properties.DataSource = DataSet.nominastipo
                LookUpEdit.Properties.DisplayMember = "descripcion"
                LookUpEdit.Properties.ValueMember = "idnomina"
                LookUpEdit.Properties.Columns.Add(New  _
                LookUpColumnInfo("descripcion", 0, "Tipo de nomina"))
                Info.Editor = LookUpEdit
            End If
        Next Info
    End Sub
End Class